import { JsonFormItemType } from 'components/json-form/JsonForm.type'

export function extractElFormItemCompProp(item: JsonFormItemType) {
  return (
    { ...item.elFormItemCompProp, placeholder: item.placeholder } || {
      placeholder: item.placeholder,
    }
  )
}

export function extractElFormItemCompEvent(item: JsonFormItemType) {
  return item.elFormItemCompEvent || {}
}

export function extractCustomEvent(item: JsonFormItemType) {
  return item.customEvent || {}
}

export function extractCustomProp(item: JsonFormItemType) {
  return item.customProp || {}
}
